import request from "./request";
import type { resData } from "@/views/center/type";
function upload(path: any, data: any): Promise<resData> {
    const formData = new FormData();
    for (let i in data) {
        // @ts-ignore
        formData.append(i, data[i]);
    }
    return request
        .post(path, formData, {
            headers: {
                "Content-Type": "multipart/form-data",
            },
        })

}

export default upload